From 11af5da8e29c9a3e5c15fdfb527a5e1f1734d690 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 31 May 2014 08:32:36 -0400 Subject: [PATCH] * lisp/mouse.el (mouse-posn-property): Ignore posn-point for mode-line clicks. --- lisp/ChangeLog | 3 +++ lisp/mouse.el | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a16094fb797..33325464f2c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2014-05-31 Stefan Monnier + * mouse.el (mouse-posn-property): Ignore posn-point for mode-line + clicks (bug#17633). + * leim/quail/latin-pre.el ("latin-2-prefix"): Use ",," rather than ", " for the single comma, since ", " is *very* common in normal French text (bug#17643). diff --git a/lisp/mouse.el b/lisp/mouse.el index 19aae2b62ad..48d25b87713 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -658,7 +658,10 @@ its value is returned." (str (posn-string pos))) (or (and str (get-text-property (cdr str) property (car str))) - (and pt + ;; FIXME: mouse clicks on the mode-line come with a position in + ;; (nth 5). Maybe we should change the C code instead so that + ;; mouse-clicks don't include a position there! + (and pt (not (memq (posn-area pos) '(mode-line header-line))) (get-char-property pt property w)))) (get-char-property pos property))) -- 2.30.2